package com.heima.model.user.dtos;

import com.baomidou.mybatisplus.annotation.TableField;
import com.heima.model.common.dtos.PageRequestDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

@Data
public class AuthDto extends PageRequestDto {
    @ApiModelProperty(value = "认证id",required = false)
    private Integer id;

    @ApiModelProperty(value = "审核失败原因",required = false)
    private String msg;

    /**
     * 0:创建中
     * 1:未审核
     * 2：审核失败
     * 9：审核通过
     */
    @TableField("status")
    private Short status;

    //状态枚举类
    @Alias("AuthDtoStatus")
    public enum Status{
        ESTABLISH((short)0),SUBMIT((short)1),FAIL((short)2),ADOPT((short)9);
        short code;
        Status(short code){
            this.code = code;
        }
        public short getCode(){
            return this.code;
        }
    }
}
